<?php
echo $erreur;
?>

<div id="wrapper-content" >
    <table class="titrepage" width="100%">
        <tr>
            <td >La liste des horoscope</td>
            <td align="right">Total | <?php echo $total ?> </td>
        </tr>
    </table>
    <table align="center" width="100%" class="list">
        <thead>
            <tr>
                <th>Image</th>
                <th>Nom</th>
                <th>Description</th>
                <th>Début</th>
                <th>Fin</th>
                <th colspan="2">Action</th>
            </tr>
        </thead>
        <?php foreach ($query as $aRow): ?>
        <?php
                $image_path = './../assets/avatar/images/' . $aRow['avatar'];
                if ($aRow['avatar'] != '') {
                    if (file_exists($image_path)) {
                        $image_path = root_url('doggy-flirt').'assets/avatar/images/' . $aRow['avatar'];
                    } else {
                        $image_path = root_url('doggy-flirt').'doggy_avatar/noimage.gif';
                    }
                } else {
                    $image_path = root_url('doggy-flirt').'assets/noimage.gif';
                }
        ?>
                <tr>
                    <td><a rel="example_group" href="<?php echo $image_path;?>" title=""><img border="0" alt="" src="<?php echo $image_path;?>" height="60"/></a></td>
                    <td><?php echo $aRow['name']; ?></td>
                    <td><?php echo get_short_description($aRow['description'],20).' ... '; ?></td>
                    <td><?php echo $aRow['start_date'].'/'.$aRow['start_month']; ?></td>
                    <td><?php echo $aRow['end_date'].'/'.$aRow['end_month']; ?></td>
                    <td width="70px"><a  href="<?php echo site_url('doggy_admin/edit_horoscope') . '/' . $aRow['id']; ?>" ><img border="0"src="<?php echo root_url('doggy-flirt') . 'assets/admin/' ?>images/modifier.png"/></a></td>
        </tr>
        <?php endforeach; ?>
            </table>
    <?php echo $pagination; ?>
</div>
<!--END wrapper-content-->
